function [P, Judge] = NIST_TEST(key)
% NIST随机性测试 一共九项 
% 返回值 P 是P-value值 默认大于0.01即为通过随机性测试 
% 返回值Judge是判断结果
    [P(1, 1), judge] = ApproximateEntropy(key);
    Judge(1,1) = strcmp(judge,'YES');
    [P(2, 1), judge] = BlockFrequency(key);
    Judge(2,1) = strcmp(judge,'YES');
    [P(3, 1), judge] = CumulativeSums(key, 0);
    Judge(3,1) = strcmp(judge,'YES');
    [P(4, 1), judge] = DiscreteFourierTransform(key);
    Judge(4,1) = strcmp(judge,'YES');
    [P(5, 1), judge] = Frequency(key);
    Judge(5,1) = strcmp(judge,'YES');
    [P(6, 1), judge] = LongestRunOfOnes(key);
    Judge(6,1) = strcmp(judge,'YES');
    [P(7, 1), judge] = Ranking(key, 8);
    Judge(7,1) = strcmp(judge,'YES');
    [P(8, 1), judge] = Runs(key);
    Judge(8,1) = strcmp(judge,'YES');
    [P(9, 1), P(10,1), judge] = Serial(key, 4);
    Judge(9,1) = strcmp(judge,'YES');
    
end